Can't repair Photos library after Time Machine restore

I recently had to wipe my 27" iMac and reinstall it from a Time Machine backup. Photos was working fine before doing that, but now when I try and launch it I'km told it needs to repair the library. It gets to 95% before saying it can't repair the library, would I like to try another.


Anyone know a fix for this? All my photos are in the cloud, but I'm not sure if they're the originals or not. If I was to start a new library with the photos would they still match with the ones in iCloud or try and upload them all, therefore making duplicates?

iMac, OS X Yosemite (10.10.3)

Posted on Jun 23, 2015 4:57 AM

Reply
18 replies

Feb 18, 2017 12:45 AM in response to Jules Gray

MBP 13", early 2015, 1TB SSD (366GB free), 16GB Ram.

I have exactly the same problem upgrading from El Capitan to Sierra, but it persists now after rolling back to El Capitan (10.1.6) with a TM restore. I have worked for several days with Apple Support, but no luck yet, so asking here.

I have 500GB Photos library (with 105k photos), backed-up to an external disk with TM.

I was able to work with the library just before doing the upgrade to Sierra. I did a TM back-up just before upgrading to Sierra. In Sierra, I tried to open photos, it said it had to update the library, but that got stuck, saying photos had "run out of application memory" and I had to force quit. After the failed update, it said I have to repair the library, which always stuck at 93% (and had to be "force quit") I tried it many times, after restarting the machine, resetting the PRAM, even in safe mode, but each time when I started photos it had to be repaired and it stopped at 93%.

We finally decided to roll my mac back to EL Capitan with my TM backup. That worked (took about 10 hours) but the photos library, which worked before with El Capitan, still needed to be "repaired" and again stopped at 93%.


What is strangely similar to the Jules Gray post is that no matter which back-up of the photos library I restore (I have about six on my TM backup drive, all previous versions of my photos library, about one TM backup a month), they all need to be repaired and all stop at 93%.

What happens at 93% (or 95%) of a photo library repair? What is it repairing at the end? Is there a way to override that ?


I am trying to figure this out because I was working on a photo book, and I have about six completed photo books I don't want to lose.


I did create a new photo library (in the restored El Capitan) and imported (almost) all my masters into it, and that does work, but of course all the faces, the moments and the projects, especially photo books are not there, and everything I read or hear says that I cannot recover those in a new library.


So my backup seems to be fine (rolled back to El Capitan). My repair stops at 93% for any restored photos library.

Is the problem in the way TM restores some files? Or is it a bug in the "repair" in Photos? OR is there some rogue or naughty file in my old photo library, that Photos tries to repair at about 93%, and it doesn't know what to do with?


I used to program. If I could I would put in some flags and see what is happening at 93% of the repair.

Jul 11, 2015 12:28 PM in response to MCtosh15

MCtosh15 wrote:


I have exactly the same issue but with the difference that my library is not saved in the cloud. Only on my external drive and, after restoring the data from my timemachine backup on my macbook.


Does anyone has an idea how I can fix this without the cloud?


MacBook Pro 13", OS X Yosemite (10.10.3)

If your backup is not good and you have nothing on iCloud then your photos are gone - maybe you can salvage the originals by right clicking on the Photos library and copying the masters folder out and importing the originals into a new library


LN

Jul 11, 2015 12:29 PM in response to zoooolooo

zoooolooo wrote:


Like MCtosh15, I have the identical problem.

After the 3TB iMac disk replacement program, the restore from Time Machine yields the following:


The library could not be opened. The library "Photos Library" could not be recognized.


Repair will not repair the /Users/******/Pictures/Photos Library.photoslibrary file.

Yosemite 10.10.4

If your backup is not good and you have nothing on iCloud then your photos are gone - maybe you can salvage the originals by right clicking on the Photos library and copying the masters folder out and importing the originals into a new library


LN

Jul 12, 2015 4:30 AM in response to LarryHN

It works. I did read that moving the iphoto and the photos library to the desktop and move it back to the original folder. Then I tried it again and it still didn't work but I recognized that the name of the folder which Photos wanted to open wasn't actually the same as the name of my Photos library. So I changed the name of my library to the one shown in Photos and restarted the computer afterwards. And now it works.

I actually don't know what exactly made it work, but due to some threads which describe an similar problem with iPhoto back in the days moving the library from A to B and back and restarting the computer afterwards could be a possible solution.


My Time Machine backup is actually a good one and works fine on my old macbook from which I transferred all the data some days ago. So I don't think the backup was broken in some way.


I hope that helps and zoooolooo gets his library back asap.

Jul 22, 2015 8:25 AM in response to Jules Gray

UPDATE from my earlier post.


For me with the Time Machine Restore, I found that for whatever reason there were different versions of my photo database.

The most recent restore was 30GB, (which was corrupt and incomplete), while a version from 1 day previously was 400GB.

I moved the 400GB photo library over from Time Machine, and launched.... ALL PERFECT.


All I can say is, I would ensure the version of the library from TM looks to be full size. Worked for me. Hope this helps someone.

Oct 6, 2015 8:36 AM in response to MCtosh15

I installed el capitan and everything looked good, including photos. Then tried to load some more photos from my camera, it was taking forever and kept stalling. It then lost all but 10 photos from my photo library. I restored the library from time machine, but it corrupted this restored library and loses all the photos again. I've tried this three times.

Any ideas?

Mar 20, 2016 9:57 PM in response to Jules Gray

I did a little trick to resolve this issue.


I renamed the library name from 'Photos Library.photoslibrary' to 'iPhoto Library.photolibrary'. And opened the Photos application. It asked me to the library location. I pointed to the renamed library and voila!!! the Photos opened the library.


I closed the Photos application and renamed the 'iPhoto Library.photolibrary' back to 'Photos Library.photoslibrary' and opened the Photos application again. It opened without any flaw.


Disclaimer: Please try at your own risk but this trick worked for me! 😉


- Sunil Jadhav (Pune, India)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't repair Photos library after Time Machine restore

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.